<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnStandardAppendInReviewFeedbackTable extends AbstractMigration
{
    public function up()
    {
        $this->table("review_feedback")
            ->addColumn('standard_append', 'enum', ['values' => 'default,yes,no', 'null' => false, 'default' => 'default', 'comment' => '是否标准新增'])
            ->save();
    }

    public function down()
    {
        $column1 = $this->table("review_feedback")->hasColumn('week_type');
        if ($column1) {
            $this->table("schedule_manage")
                ->removeColumn('standard_append')
                ->save();
        }
    }
}
